<?php
pc_base::load_sys_class('hook','','0');
class weibo extends hook{
	Final static function admin_content_init() {
		global $modelid;
		$catid = $_GET['catid'];
		$CATEGORYS = getcache('category_content_'.get_siteid(),'commons');
		$CAT = $CATEGORYS[$catid];
		$modelid = $CAT['modelid'];
		$plugin_cfg = getcache('weibo','plugins');
		if(self::loadauthinfo()) {
			include template('plugin/weibo','push');
		}	
	}

	static function loadauthinfo() {
		$auth_db = pc_base::load_plugin_model('weibo_auth_info_model','weibo');
		return $auth_db->get_one(array('source'=>'sina'));
	}
}
?>